<!DOCTYPE html>
<html lang="en">
 
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>recordbook</title>
    <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
    <meta name="robots" content="noindex, nofollow" />
    <meta name="googlebot" content="noindex, nofollow" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <!-- <link rel="stylesheet" type="text/css" href="record.css"> -->
    <link rel="stylesheet" href="text.css">
 
</head>
 
<body>
 
    <section id="todoapp">
        <header class="header">
 
            <h1>诗意记事本</h1>
            <!-- 输入框 -->
            <input v-model="inputValue" @keyup.enter="add" autofocus="autofocus" autocomplete="off" placeholder="请输入待办项"
                class="new-todo" />
        </header>
 
 
 
 
        <section class="main">
            <ul class="todo-list">
                <li class="todo" v-for="(item,index) in list">
                    <div class="view">
                        <span class="index">{{ index+1 }}.</span>
                        <label>{{ item }}</label>
                        <button class="destroy" @click="remove(index)"></button>
                    </div>
                </li>
            </ul>
        </section>
 
 
        <!-- 清空统计 -->
        <footer class="footer">
            <span class="todo-count">
                <strong>第1页</strong>
            </span>
            <button class="clear-completed">清空</button>
        </footer>
    </section>
 
    <footer class="info">
        <p>
            <a href="http:www.baidu.com">
                <img src="" alt="" /></a>
        </p>
    </footer>
 
    <script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
    <script>
        var app = new Vue({
            el: "#todoapp",
            data: {
                list: ["vue2---3", " React", "计算机组成原理"],
                inputValue: "好好学习，天天向上"
            },
 
            methods: {
                add: function () {
                    this.list.push(this.inputValue);
                },
                remove: function (index) {
                    this.list.splice(index, 1)
                }
            },
 
        })
    </script>
</body>
 
</html>